home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d17
/
swplpt_c.arc
/
SWAPLPTS.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-04-12
|
751b
|
29 lines
/*
* S W A P L P T S . C
*
* COPYRIGHT (C) 1991 JOHN W GROTHMAN. ALL RIGHTS RESERVED.
*
* purpose:
* Swap LPT1 and LPT2.
*
* to do:
*
* technical notes:
* This is a SIMPLE thing to do. Just swap the base I/O addresses
* in low DOS memory that DOS uses to map the LPT port hardware.
*
* modification log:
* 1.0 4/12/90 John W Grothman
*/
void main()
{
int far *lptr1 = (int far *)0x0408; /* Pointer to address of LPT1 */
int far *lptr2 = (int far *)0x040A; /* Pointer to address of LPT2 */
unsigned int lptbuf;
lptbuf = *lptr1; /* Save LPT1's base I/O address */
*lptr1 = *lptr2; /* Put LPT2's base addr into LPT1 */
*lptr2 = lptbuf; /* Put LPT1's base addr into LPT2 */
}